package com.xiaobange.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xiaobange.entity.Reservation;
import com.xiaobange.vo.DoctorInfo;
import com.xiaobange.vo.ResultResponse;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.List;

/**
* @author banji
* @description 针对表【appointment(预约表)】的数据库操作Mapper
* @createDate 2025-04-24 17:57:21
* @Entity com.xiaobange.entity.Appointment
*/
public interface ReservationMapper extends BaseMapper<Reservation> {

    /**
     * 用户更新预约信息
     * @param reservation
     * @return
     */
    int modifyOrder(Reservation reservation);

    /**
     * 查询用户预约信息
     * @param id
     * @param status
     * @return
     */
    List<Reservation> selectStatus(@Param("clientId") String id,@Param("status") String status);

    /**
     * 查询出不可用的预约时间
     * @param localDate
     * @return
     */
    List<LocalTime> notAvailableTime(@Param("date") LocalDate localDate,@Param("doctorId") String doctorId);


    /**
     * 查询医生信息（用于展示预约列表）
     * @return
     */
    List<DoctorInfo> doctorList();
}




